<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>ColumNav example: custom icons</title>
    <script type="text/javascript" src="../js/yui/yahoo.js"></script>
    <script type="text/javascript" src="../js/yui/event.js"></script>
    <script type="text/javascript" src="../js/yui/container_core.js"></script>
    <script type="text/javascript" src="../js/yui/dom.js"></script>
    <script type="text/javascript" src="../js/yui/animation.js"></script>
    <script type="text/javascript" src="../js/yui/connection.js"></script>
    <script type="text/javascript" src="../js/carousel.js"></script>
    <script type="text/javascript" src="../js/columnav.js"></script>
    <link href="../css/carousel.css" rel="stylesheet" type="text/css"/>
    <link href="../css/columnav.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript">
      try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {}
      function init() {
          var cn_cfg = { prevElement: 'columnav-prev', source: document.getElementById('colors') };
          var cn = new YAHOO.extension.ColumNav('columnav', cn_cfg);

          var sv_cfg = { url: location.href, modifier: 'HTML' };
          var sv = new YAHOO.extension.SourceViewer('source', sv_cfg);
      }
      YAHOO.util.Event.addListener(window, 'load', init);
    </script>
    <script type="text/javascript" src="../js/viewsource.js"></script>
    <link href="../css/stringify.css" rel="stylesheet" type="text/css"/>
    <style type="text/css">
      .carousel-component ul.carousel-list li a.columnav-has-menu span {
          background-image: url(../images/folder.png) !important;
      }
      .carousel-component ul.carousel-list li a.red span {
          background-image: url(../images/red.png) !important;
      }
      .carousel-component ul.carousel-list li a.yellow span {
          background-image: url(../images/yellow.png) !important;
      }
      .carousel-component ul.carousel-list li a.green span {
          background-image: url(../images/green.png) !important;
      }
    </style>
  </head>
  <body>
    <div id="main">
      <div id="content">
        <p style="float:right"><a href="../">Documentation</a></p>
        <h1>ColumNav</h1>
        <h2>Example</h2>
        <div class="prevButton">
          <a href="javascript:void(0)" id="columnav-prev">&lt; back</a>
        </div>
        <div id="columnav" class="carousel-component">
          <div class="carousel-clip-region">
            <ul class="carousel-list"></ul>
          </div>
        </div>
        <div class="viewsource" id="source"></div>
        <p>The ColumNav above is initialized from the list below. Each link in the sub-list has a class name which is propagated to the corresponding item in the ColumNav, which you can use for fine-grained CSS control. In this example, the class name is used to display custom icons.</p>
        <ul id="colors">
          <li>
            <a href="">Colors</a>
            <ul>
              <li><a href="" class="red">Red</a></li>
              <li><a href="" class="yellow">Yellow</a></li>
              <li><a href="" class="green">Green</a></li>
            </ul>
          </li>
        </ul>
      </div>
    </div>
  </body>
</html>
